class ListNode{
    constructor(val, next = null) {
    this.val = val;   // 节点值
    this.next = next; // 指向下一个节点的指针
  }
}
const head = new ListNode(1, new ListNode(2, new ListNode(3)));